package injectionPattern_using;

public class MyMessageIDTest {
       

    
	public static void main(String[] args) {
		
		String msg ="Merhaba Erkan";
		String email="erkanyildirim28@gmail.com";
	    String phone="5375142066";
	    
	    MessageServiceInjector injector=null;
	    
	    Consumer app = null;
		
	  //Send email
	    injector = new EmailServiceInjector();
	    app  =injector.getConsumer();
		app.processMessages(msg, email);
		
		
	    //Send SMS
        injector = new SmsServiceInjector();
        app = injector.getConsumer();
        app.processMessages(msg, phone);
		
		
		
	}
    
    
}
